﻿@{
    ViewBag.Title = Local("Navigator");
    Layout = GetPath(SystemDirectory.Shared, "_Dialog.cshtml");
}

@model Navigator
    
@if (IsValided)
{ 
    using (Html.BeginForm())
    {
    <div class="box">
        <label>@Local("Navigator.DisplayName")</label>
        <div class="right">
            @Html.TextBoxFor(model=>model.DisplayName)
        </div>
    </div>
    
    <div class="box">
        <label>@Local("Navigator.EnglishName")</label>
        <div class="right">
            @Html.TextBoxFor(model => model.EnglishName)
        </div>
    </div>
    
    <div class="box">
        <label>@Local("Navigator.Key")</label>
        <div class="right">
            @Html.TextBoxFor(model => model.Key)
        </div>
    </div>
    
    if (Model.NavigatorID == 0)
    {
    <div class="box">
        <label>@Local("Navigator.Location")</label>
        <div class="right">
            @Html.DropdownListForEnum(model => model.Location, null, null, AreaName)
        </div>
    </div>
    }
    else
    {
    <div class="box">
        <label>@Local("Navigator.ParentID")</label>
        <div class="right">
            @Html.DropDownListNavigatorsFor(model => model.ParentID, ViewBag.Theme as string, Model.Location, Model.NavigatorID)
        </div>
    </div>
    }
    
    <div class="box">
        <label>@Local("Navigator.NavigatorUrl")</label>
        <div class="right winput">
            @Html.TextBoxFor(model => model.NavigatorUrl)
        </div>
    </div>
    
    <div class="box">
        <label>@Local("Navigator.SortOrder")</label>
        <div class="right">
            @Html.TextBoxFor(model => model.SortOrder)
        </div>
    </div>
    
    <div class="box">
        <label>@Local("Navigator.Title")</label>
        @Html.TextAreaFor(model => model.Title)
    </div>
    
    <div class="box">
        <label>@Local("Navigator.OnClick")</label>
        @Html.TextAreaFor(model => model.OnClick)
    </div>

    <div class="box">
        <button class="submit">@Local("Navigator.Save")</button>
    </div>
    }
}